package ac.svn.accesscontrol.store.validator;

import java.util.HashMap;
import java.util.Map;

public class ValidationResult 
{
    private boolean valid;
    private Map<String,Object> errorDetails;
    private Map<String,Object> warningsDetails;
    private Map<String,Object> infoDetails;
      
    public ValidationResult(boolean valid) {
	super();
	this.valid 		= valid;
	this.errorDetails 	= new HashMap<String, Object>();
	this.warningsDetails 	= new HashMap<String, Object>();
	this.infoDetails 	= new HashMap<String, Object>();
    }

    public ValidationResult() {
	super();
	this.valid 	  	= true;
	this.errorDetails 	= new HashMap<String, Object>();
	this.warningsDetails 	= new HashMap<String, Object>();
	this.infoDetails 	= new HashMap<String, Object>();
    }

    /**
     * @return the valid
     */
    public boolean isValid() {
        return valid;
    }

    /**
     * @param valid the valid to set
     */
    public void setValid(boolean valid) {
        this.valid = valid;
    }


    /**
     * @return the details
     */
    public Map<String, Object> getErrors() {
        return errorDetails;
    }


    /**
     * @param details the details to set
     */
    public void setDetails(Map<String, Object> details) {
        this.errorDetails = details;
    }

    /**
     * @return the warningsDetails
     */
    public Map<String, Object> getWarningsDetails() {
        return warningsDetails;
    }

    /**
     * @return the infoDetails
     */
    public Map<String, Object> getInfoDetails() {
        return infoDetails;
    }
}
